<include file="__THEME__/header" />

<php>$name = '好友'</php>
<php>if( isset( $_GET['uid']) ){</php>
<php>$name = getUserName( $_GET['uid'] );</php>
<input type='hidden' id='uid' value='{$_GET['uid']}'>
       <php>}</php>
<link href="../Public/basic.css" rel="stylesheet" type="text/css" />
<link href="../Public/index.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__PUBLIC__/js/pagination/jquery.pagination.js"></script>
<link href="__PUBLIC__/js/pagination/pagination.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" >
    var data_count = {$count};
    var group = "{$group}";
    var type  = "<?php echo "$type"; ?>";
    var items_per_page = {$page}; //每页显示多少条数据;
    $("#page").pagination(data_count, {
        num_edge_entries: 2,
        num_display_entries: 8,
        items_per_page:items_per_page,
        next_text:'上一页',
        prev_text:'下一页',
        link_to:"javascript:(0)",
        callback: pageselectCallback
    });
    function pageselectCallback(page_id, jq){
        //ajax获取评论json数据
        var page = page_id+1; //鼠标按的页数
        //var _this = this;
        //var type = $(this).attr("rel");
        var loading = '<div align="center" style="padding-top:50px"><img src="'+PUBLIC+'/images/loading_blue_big.gif"></div>';
        var userId = $( '#uid' ).val();
        $("#feed_content").html(loading);
        $("#feed_content").load(APP+"/Home/feed",{type:type,p:page,who:group,user:userId},function(txt){

            $(".feed_item").removeClass("on");
            if(!txt){
                $("#feed_more").hide();
                $("#feed_content").html("<div style='font-size:20px;padding-top:20px' align='center'>暂无相关动态...</div>");
            }

        });
    }
</script>
<script type="text/javascript" src="../Public/feed.js"></script>
<script type="text/javascript" src="../Public/home_index.js"></script>
<div class="content"><!-- 内容 begin  -->

    <include file="__THEME__/apps" />

    <div class="main"> <!-- 右侧内容 begin  -->
        <div class=page_title> <!-- page_title begin -->
            <h2><img src="../Public/images/app_icon/ico_app_group.gif" />{$name}最近的动态</h2>
            <div class="c"></div>
        </div><!-- page_title end -->
        <div class="tab-menu"><!-- 切换标签 begin  -->
            <ul>
                <li><a href="__URL__" class="on"><span>全部动态</span></a></li>
            </ul>
        </div><!-- 切换标签 end  -->


        <div class="Friend"><!-- 好友心情 begin  -->
            <div class="sidebar pt10">

                <php>if( !isset( $_GET['uid']) ){</php>
                <div class="FSort">
                    <div class="tit">好友范围：</div>
                    <div class="pt10 pl10 pb10">
                        <select onchange="friendsFeed(this.value);">
                            <option value="all">全部好友</option>
                            <volist name="allGroup" id="vo">
                                <option value="{$vo['id']}" <?php if( $_GET['who'] == $vo['id'] ){echo 'selected';} ?>>{$vo['name']}</option>
                            </volist>
                        </select>
                    </div>
                    <div class="btm"></div>
                </div>
                <php>}</php>

                <div class="FSort">
                    <div class="tit">动态类别：</div>
                    <div>
                        <ul>
                            <li><a href="javascript:void(0)" class="on feed_item1" rel="all" id="feed_all_item"><span>全部动态</span></a></li>

                            <li><a href="javascript:void(0)" class="feed_item1" rel="3"><span>心情</span></a></li>
                            <li><a href="javascript:void(0)" class="feed_item1" rel="10"><span>相册</span></a></li>
                            <li><a href="javascript:void(0)" class="feed_item1" rel="4"><span>日志</span></a></li>
                            <li><a href="javascript:void(0)" class="feed_item1" rel="11"><span>分享</span></a></li>
                            <li><a href="javascript:void(0)" class="feed_item1" rel="13"><span>投票</span></a></li>
                            <li><a href="javascript:void(0)" class="feed_item1" rel="14"><span>活动</span></a></li>
                            <li><a href="javascript:void(0)" class="feed_item1" rel="12"> <span>群组</span></a></li>
                        </ul>
                    </div>
                    <div class="btm"></div>
                </div>
            </div>
            <div class="FList" id="feed_content"  style="width:560px;" >

            </div>
            <div style="width:560px; margin-top:10px;">
                <div id="Pagination" class="pagination"><?php echo page( $page_count ); ?> </div>
            </div>
            <div class="c"></div>
        </div>

<input type='hidden' id='page_count' value="{$page}">
    </div><!-- 右侧内容 end  -->

    <div class="c"></div>
</div><!-- 内容 end -->
<include file="__THEME__/footer" />
